package com.icinfo.cloud.provider.common.enums;


/**
 * @author
 */

public enum FlowStageTypeEnum {

    CASE_SOURCE_STAGE_AYDJ("AYDJ","案源登记"),

    CASE_SOURCE_STAGE_AYFP("AYFP","案源分派"),

    CASE_SOURCE_STAGE_AYZP("AYZP","案源指派"),

    CASE_SOURCE_STAGE_AYYS("AYYS","案源移送"),

    CASE_SOURCE_STAGE_LASP("LASP","立案审批"),

    CASE_SOURCE_STAGE_ABYLASP("BYLASP","不予立案审批"),

    CASE_SOURCE_STAGE_ALASPTG("LASPTG","立案审批通过"),

    CASE_SOURCE_STAGE_BYLASPTG("BYLASPTG","不予立案审批通过");


    private String code;
    private String name;

    FlowStageTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    /**
     * 描述：通过枚举值获取对应枚举对象
     *
     * @param code 枚举值
     * @return 枚举对象
     * @author zhangqiang
     */
    public static FlowStageTypeEnum getFlowStageTypeEnum(String code) {
        for (FlowStageTypeEnum flowStageTypeEnum : FlowStageTypeEnum.values()) {
            if (flowStageTypeEnum.getCode().equals(code)) {
                return flowStageTypeEnum;
            }
        }
        return null;
    }

    /**
     * 描述：通过枚举值获取枚举名称
     *
     * @param code 枚举值
     * @return 枚举名称
     * @author zhangqiang
     */
    public static String getValue(String code) {
        for (FlowStageTypeEnum dictEnum : FlowStageTypeEnum.values()) {
            if (dictEnum.getCode().equals(code)) {
                return dictEnum.getName();
            }
        }
        return null;
    }
}
